package org.brownflat.watergate.domain;

/**
 * <p>&copy Rupert Jones 2012</p>
 *
 * @author rup
 */
public class UserBuilder extends AbstractBuilder<User> {
    public UserBuilder() {
        super(new User());
    }

    public UserBuilder withUsername(String username) {
        getEntity().setUsername(username);
        return this;
    }

    public UserBuilder withPassword(String password) {
        getEntity().setCleartextPassword(password);
        return this;
    }

    public UserBuilder withUserRepository(UserRepository userRepository) {
        getEntity().addUserRepository(userRepository);
        return this;
    }

    public UserBuilder withFullName(String fullname) {
        getEntity().setFullName(fullname);
        return this;
    }

    public UserBuilder withGroup(Group group) {
        getEntity().addGroup(group);
        return this;
    }
}
